package ks.client.kommander;

/**
 * Action - "All the doors in this spaceship have a cheerful and sunny 
 *           disposition. It is their pleasure to open for you, and their 
 *           satisfaction to close again with the knowledge of a job well 
 *           done." - Hitchhiker's Guide to the Galaxy
 * 
 * The Action interface specifies the methods that must be implemented in 
 * any class that is passed to the Kommander's addAction(...) method. These 
 * two methods, ack() and nack(), are called by the Kommander when the 
 * application has entered a state in which one of them should be run.
 * 
 * Example Implementation:
 *  // (passed directly to Kommander's addAction(...) method)
 *  // Note: Make sure that any outside variables used inside the following 
 *  //       Action either are final.
 *  new Action() {
 *      public void ack() {
 *          // Your code here
 *      }
 *      
 *      public void nack() {
 *          // Your code here
 *      }
 *  }
 * 
 * @see http://java.sun.com/docs/books/tutorial/java/concepts/interface.html
 * @see http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.12.4
 * 
 * @author Christopher Page
 */
public interface Action {
	/**
	 * Your implementation of this method should contain the code that will be 
	 * run on receipt of an ack.
	 */
	public void ack();
	
	/**
	 * Your implementation of this method should contain the code that will be 
	 * run on receipt of a nack.
	 */
	public void nack();
}
